package com.thinking.live.controller;



import com.thinking.live.entity.pojo.req.RechargeMoneyReq;
import com.thinking.live.entity.pojo.req.RechargeQueryReq;
import com.thinking.live.entity.pojo.req.RevocationReq;
import com.thinking.live.entity.pojo.resp.RechargeMoneyResp;
import com.thinking.live.entity.pojo.resp.RechargeQueryResp;
import com.thinking.live.entity.pojo.resp.RevocationResp;
import com.thinking.live.service.RechargeMoneyService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/recharge")
public class RechargeMoneyController {

    @Resource
    private RechargeMoneyService rechargeMoneyService;

    /**
     * 充值接口
     * @return
     */
    @RequestMapping("/money")
    public RechargeMoneyResp rechargeMoney( @RequestBody RechargeMoneyReq request) {
        return rechargeMoneyService.rechargeMoney(request);
    }

    /**
     * 撤销订单
     * @return
     */
    @RequestMapping("/revocation")
    public RevocationResp revocation( @RequestBody RevocationReq request) {
        return rechargeMoneyService.revocation(request);
    }

    /**
     * 查询订单状态
     * @return
     */
    @RequestMapping("/query")
    public RechargeQueryResp query( @RequestBody RechargeQueryReq request) {
        return rechargeMoneyService.query(request);
    }
}
